/**
 * 实现浅拷贝的方法
 * Object.assign()
 * lodash 的_.clone()方法
 * 展开运算符 ...
 * 文章参考
 */
let obj1 = {
  person: {
    name: "小明",
    age: 41
  },
  sports:'basketball'
}
let obj2 = {}
Object.assign(obj2, obj1);
console.log('浅拷贝后的', obj2)
obj2.person.name = '小王'
console.log('修改值后', obj2)
console.log('修改值后', obj1)